package bishi.jingdong;

import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

/**
 * @Classname Main1
 * @Description TODO
 * @Date 2021/10/9 19:48
 * @Created by ASUS
 */
public class Main1 {
    static int cnt = Integer.MAX_VALUE;
    static int B, A;

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        List<Integer> data = Arrays.stream(scanner.nextLine().split(" "))
                .map(Integer::parseInt).collect(Collectors.toList()); // 998776555232323
        int a = data.get(0), b = data.get(1), f = data.get(2), k = data.get(3);
        if (b < f) System.out.println(-1);
        // 初始态可以到达f
        int capacity = b - f;
        B = b;
        A = a;
        dfs(f, capacity, A, k, 0);
        dfs(f, B, A, k, 1);
        System.out.println(cnt == Integer.MAX_VALUE ? -1 : cnt);
    }

    public static void dfs(int f, int capacity, int target, int k, int chargeCnt) {
        if (canReachF(f, capacity, target)) {
            k--;
            if (k == 0) {
                cnt = Math.min(cnt, chargeCnt);
                return;
            }
            // charge 充电
            dfs(f, B, Math.abs(target - A), k, chargeCnt + 1);
            // no charge 不充电
            dfs(f, capacity - Math.abs(f - target) * 2, Math.abs(target - A), k, chargeCnt);
        } else {
            if (k == 1) {
                if (capacity >= Math.abs(f - target)) cnt = Math.min(cnt, chargeCnt);
            }
        }
    }

    public static boolean canReachF(int f, int capacity, int target) {
        int length = Math.abs(f - target) * 2;
        return capacity >= length;
    }
}
